Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 74   Methods: 5
NCLOC: 41   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
EJBBasedWrapperClassWriter.java 50% 75% 80% 71.4%
coverage coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 package org.apache.geronimo.ews.ws4j2ee.toWs.wrapperWs;
 17   
 
 18   
 import org.apache.commons.logging.Log;
 19   
 import org.apache.commons.logging.LogFactory;
 20   
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 21   
 import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext;
 22   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
 23   
 import org.apache.geronimo.ews.ws4j2ee.toWs.JavaClassWriter;
 24   
 import org.apache.geronimo.ews.ws4j2ee.toWs.UnrecoverableGenerationFault;
 25   
 import org.apache.geronimo.ews.ws4j2ee.utils.Utils;
 26   
 
 27   
 /**
 28   
  * This class genarate the wrapper Webservice.
 29   
  *
 30   
  * @author Srinath Perera(hemapani@opensource.lk)
 31   
  */
 32   
 public abstract class EJBBasedWrapperClassWriter extends JavaClassWriter {
 33   
     protected static Log log =
 34   
             LogFactory.getLog(WrapperWsGenerator.class.getName());
 35   
     protected String seiName = null;
 36   
     protected EJBContext context;
 37   
 
 38   
     /**
 39   
      * @param j2eewscontext
 40   
      * @param qulifiedName
 41   
      * @throws GenerationFault
 42   
      */
 43  8
     public EJBBasedWrapperClassWriter(J2EEWebServiceContext j2eewscontext)
 44   
             throws GenerationFault {
 45  8
         super(j2eewscontext, getName(j2eewscontext) + "Impl");
 46  8
         context = j2eewscontext.getEJBDDContext();
 47  8
         if (context == null) {
 48  0
             throw new UnrecoverableGenerationFault("for ejbbased Impl" +
 49   
                     " the EJBDDContext must not be null");
 50   
         }
 51   
     }
 52   
 
 53  8
     private static String getName(J2EEWebServiceContext j2eewscontext) {
 54  8
         String name = j2eewscontext.getWSDLContext().gettargetBinding().getName();
 55  8
         if (name == null) {
 56  0
             name = Utils.qName2JavaName(j2eewscontext.getWSDLContext().gettargetBinding().getQName());
 57   
         }
 58  8
         return name;
 59   
     }
 60   
 
 61  0
     protected String getimplementsPart() {
 62  0
         return " implements " + j2eewscontext.getMiscInfo().getJaxrpcSEI() + ",org.apache.geronimo.ews.ws4j2ee.wsutils.ContextAccessible";
 63   
     }
 64   
 
 65  8
     protected void writeAttributes() throws GenerationFault {
 66  8
         out.write("private " + seiName + " ejb = null;\n");
 67  8
         out.write("private org.apache.axis.MessageContext msgcontext;\n");
 68   
     }
 69   
 
 70  8
     protected void writeConstructors() throws GenerationFault {
 71  8
         out.write("\tpublic " + classname + "(){}\n");
 72   
     }
 73   
 }
 74